#ifndef __BOARD_COM_H
#define __BOARD_COM_H

#include "offline.h"
#include "rttypes.h"
#ifdef __cplusplus
extern "C"{
#endif

#include <rtthread.h>
#include <rtdevice.h>
#include "can_common.h"
#include "robotdef.h"

typedef struct
{
    CanMessage_t CanMessage;
    rt_uint8_t offlinemanage_event;
    #if defined(GIMBAL_BOARD)
        #if defined(SENTRY_MODE)
        Chassis_referee_Upload_Data_s Chassis_Upload_Data;
        #endif 
    #endif 

    #if defined(CHASSIS_BOARD)
    Chassis_Ctrl_Cmd_s Chassis_Ctrl_Cmd;
    #endif 
} board_com_t;


typedef struct
{
    CanMessage_t CanMessage;
    offline_manage_init_t offline_manage_init;
} board_com_init_t;


void board_com_init(board_com_init_t board_com_init);
void board_send(rt_uint32_t target_id, void *data);
void board_recv(struct rt_can_msg rxmsg);
void *BoardRead();

#ifdef __cplusplus
}
#endif

#endif // CAN_COMMON_H